package com.leapp.sk.ui.fragment
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.RelativeLayout
import cc.vv.lklibrary.log.LogOperate
import com.example.mvp.binder.BaseDataBinder
import com.example.mvp.fragment.BaseFragmentMVP
import com.leapp.sk.R
import com.leapp.sk.binder.FindDataBinder
import com.leapp.sk.ui.activity.find.AuditionsActivity
import com.leapp.sk.ui.activity.find.BeBedTimeStoryActivity
import com.leapp.sk.ui.activity.find.ChildcareEducationActivity
import com.leapp.sk.viewdelegate.FindDelegate
/**
 * 发现
 * @author  chaohaipeng  on 2018/7/2.
 */
class FindFragment : BaseFragmentMVP<FindDelegate>() {


    override fun initData() {
    }

    override fun initView(p0: Bundle?) {
        viewDelegate.setTitle(activity.resources.getString(R.string.app_find))
    }

    override fun bindEvenListener() {
        viewDelegate.setOnClickListener(View.OnClickListener {
            val intent=Intent(activity, BeBedTimeStoryActivity::class.java)
            startActivity(intent)
        },R.id.rl_ff_bedtime_story)

        viewDelegate.setOnClickListener(View.OnClickListener {
            val intent=Intent(activity, AuditionsActivity::class.java)
            startActivity(intent)
        },R.id.rl_ff_auditions)
        viewDelegate.setOnClickListener(View.OnClickListener {
            val intent=Intent(activity, ChildcareEducationActivity::class.java)
            startActivity(intent)
        },R.id.rl_ff_childcare_education)

    }

    override fun getDelegateClass(): Class<FindDelegate> {
        return FindDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return FindDataBinder()
    }

}